import Vue from 'vue'
import App from './App'
import uView from "uview-ui"
import request from "./utils/request"


Vue.config.productionTip = false

Vue.prototype.$request = request

// 定义一个 Vue 全局的过滤器，名字叫做  msgFormat
Vue.filter('genderFilter', function (value) {
  return value === 1 ? '男' : '女';
})

// 根据数组对象的值删除对应项
Vue.prototype.removeByValue = function (arr, attr, value) { 
  let index = 0;
  for (let i in arr) {
    if (arr[i][attr] == value) {
      index = i;
      break;
    }
  }
  arr.splice(index, 1);
 }

Vue.use(uView)

App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()